package com.startest.sms.utils;

import java.util.Random;

/**
 * 生成6位随机数
 */
public class PhoneRandomCode {
    private final static int codeLength = 6;

    public static String randomCode(){
        Random random = new Random();
        int a;
        String result = "";
        for (int j=0;j<codeLength;j++){
            a = random.nextInt(10);
            result+=String.valueOf(a);
        }
        return result;
    }
}
